<template>
    <div class="merchandiseNews">
        <div  v-for="(item, key) in merchandise">
            <div class="pictorial">
                <img :src=item.img alt="">
            </div>
            <div class="detailed">
                <p class="introduce">{{item.introduce}}</p>
                <p class="config"><span v-for="(val, index) in item.config">{{val}}</span></p>
                <p class="price"><span>￥</span><span class="cost">{{item.price}}</span><span>.00</span><span class="seckill">秒杀</span></p>
                <p><span v-show="item.selfSupport" class="selfSupport">自营</span><span class="evaluate">{{item.evaluate}}</span><span class="good">{{item.good}}</span></p>
            </div>
        </div>
        <br>

    </div>
</template>

<script>
    export default {
        name: "merchandiseNews",
        data(){
          return{

          }
        },
        props:{
            merchandise:Array
        }
    }
</script>

<style scoped>
    .pictorial, .detailed{
        display: inline-block;
        box-sizing: border-box;
        overflow: hidden;
        margin:0 0 20px 20px;
        padding: 18px 10px 0 0;
    }
    .pictorial{
        height: 250px;
        text-align: center;
        width:30%;
    }
    .pictorial>img{
        display: inline-block;
        width: 100%;
        max-width: 250px;
        height: 100%;
    }
    .detailed{
        width:62%;
    }
    .introduce{
        width: 100%;
        font-size: 32px;
        word-break:break-all;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp:2;
    }
    .config{
        margin-top: 20px;
        font-size: 0;
    }
    .config>span{
        font-size: 24px;
        color: #5d5d58;
        background: #eeeee7;
        padding: 0 8px;
        margin-left: 8px;
        border-radius: 6px;
    }
    .price{
        font-size: 0;
        margin: 10px 0;
    }
    .price>span{
        font-size: 24px;
        color: #f23030;
    }
    .price>.cost{
        font-size: 36px;
        color: #f23030;
        margin: 0 12px;
    }
    .price>.seckill{
        font-size: 24px;
        border-radius: 6px;
        display: inline-block;
        background: #f23030;
        color: #fff;
        padding: 0 8px;
        margin: 0 8px;
    }
    .selfSupport{
        display: inline-block;
        padding: 0 4px;
        color: #f23030;
        line-height: 1;
        font-size: 24px;
        border: 1px solid #f23030;
    }
    .evaluate, .good{
        font-size: 24px;
        color: #5d5d58;
        padding: 4px 8px;
        margin-left: 8px;
    }
</style>
